public class ActionScope {
    public static void main(String[] args) {
       final int num1 = 1;
       Converter<Integer,String> s1 = (param)-> System.out.println(String.valueOf(param+num1));
        s1.convert(2);

       /* int num2 = 1;
        Converter<Integer,String> s2 = (param)-> System.out.println(String.valueOf(param+num2));
        s2.convert(2);
        // 从lambda 表达式引用的本地变量必须是最终变量或实际上的最终变量
        num2 = 5;*/

    }
}

interface Converter<T1,T2>{
    void convert(int i);
}
